package com.ebupt.common.ktx

import android.os.Bundle
import android.view.View
import androidx.annotation.LayoutRes
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding
import androidx.fragment.app.Fragment

/**
 * Activity和Fragment的拓展方法
 */

fun<T:ViewDataBinding> AppCompatActivity.bindView(@LayoutRes layoutRes: Int ):T = DataBindingUtil.setContentView(this,layoutRes)




